﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BestTrader.Cms.Core.ApiModels
{
    /// <summary>
    /// Api 响应数据类型
    /// </summary>
    public class ApiData<T>
    {
        public ApiData()
        {
            this.Success = true;
            this.Code = 1;
            this.Message = "初始化成功！";
        }

        public ApiData(T data)
        {
            this.Success = true;
            this.Code = 1;
            this.Message = "初始化成功！";
            this.Data = data;
        }

        public ApiData(T data, bool success, int code, string message)
        {
            this.Success = success;
            this.Code = code;
            this.Message = message;
            this.Data = data;
        }

        public bool Success { get; set; }

        public string Message { get; set; }

        public int Code { get; set; }

        public T Data { get; set; }
    }
}
